package com.bdqn.service;

import com.bdqn.dao.SysRoleMapper;
import com.bdqn.pojo.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Transactional
@Service("sysRoleServiceImpl")
public class SysRoleServiceImpl implements SysRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;
    @Override
    public List<SysRole> SysRoleList(String realName1) {
        try {
            return sysRoleMapper.SysRoleList(realName1);
        } catch (Exception e) {
            e.printStackTrace();
            throw e;
        }
    }


    @Override
    public int addSysRole(SysRole sysRole) {
        sysRoleMapper.addSysRole(sysRole);
        return 1;
    }
}
